package org.colafries.metadata.driver.impl;

import lombok.extern.slf4j.Slf4j;
import org.colafries.metadata.convert.ITypeConvert;
import org.colafries.metadata.query.DBQuery;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author colafries
 * @version v1.0
 * @ClassName MysqlDriver
 * @Description
 * @date Created in 2024/3/20
 **/
@Service("mysql")
@Slf4j
public class MysqlDriverImpl extends AbstractJdbcDriver {
    @Resource(name = "MysqlQuery")
    DBQuery dbQuery;
    @Resource(name = "MySqlTypeConvertImpl")
    ITypeConvert iTypeConvert;

    @Override
    public ITypeConvert getTypeConvert() {
        return this.iTypeConvert;
    }

    @Override
    public DBQuery getDBQuery() {
        return this.dbQuery;
    }

    /**
     * 驱动类
     *
     * @return
     */
    @Override
    public String getDriverClass() {
        return "com.mysql.jdbc.Driver";
    }

    @Override
    public String getSubProtocol() {
        return "mysql";
    }

}
